﻿namespace HellowWorld
{
    using System;
    using System.IO;

    class Program
    {
        static void Main(string[] args)
        {
            string fileName = string.Empty, directory = string.Empty;

            FileBuilder FB = new FileBuilder();
            MessageBuilder MB;

            do
            {
                Console.WriteLine("Enter file directory:");
                directory = Console.ReadLine();
            } while (!Path.IsPathRooted(directory));

            do
            {
                Console.WriteLine("Enter file name with extension:");
                fileName = Console.ReadLine();
            } while (!Path.HasExtension(fileName));

            Console.WriteLine("Write symbol Unicode:");
            int symbol = Convert.ToInt32(Console.ReadLine());
            MB = new MessageBuilder(symbol);

            FB.BuildEmptyFile(Path.Combine(directory, fileName));
            FB.WriteMessage(MB);
            Console.WriteLine(FB.ReadMessage());
            Console.ReadKey();
        }
    }
}
